Adding OneDrive to CtrlShare#
This guide shows how to configure Microsoft OneDrive for your CtrlShare instllation.
Open M-Files Admin
Find and connect to your M-Files server
Open the target vault and select the Configurations menu
Select the Other Applications section and click on CtrlShare
Then select the Configuration tab
Create a new DriveConfiguration
Configuration of OneDrive in CtrlShare
For OneDrive for Business, please add the following values:
drive_type should be set to ONE_DRIVE_BUSINESS
client_id should be set to the Application (client) ID from your Azure AD app registration
client_secret should be set to the Application Secret from your Azure AD app registration
redirect_uri should be set to https://login.live.com/oauth20_desktop.srf
Before continuing, please open a browser window and log in to Microsoft Office online via, for instance, Office.com
Please note that the account that you log in as now will be used for storing OneDrive files for all users using CtrlShare via M-Files
Now that you are logged in, please insert your Application (client) ID in this URL where it says APPLICATIONID:
https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?client_id=APPLICATIONID&response_type=code&scope=files.readwrite%20user.readbasic.all%20offline_access&redirect_uri=https://login.live.com/oauth20_desktop.srf
Paste the modified link with your application id into the same browser and hit enter. A page asking for permissions should now appear. Simply hit Accept.
Permissions required for CtrlShare
Upon accepting the permissions, you should now see a blank page. Copy the URL from the address bar somewhere to reveal the code portion. It should look something like this: https://login.live.com/oauth20_desktop.srf?code=0.AUgAvawdawdawdawdawdQi7c0oLGUKadawdawdawdawdawdeu&session_state=xxxxxx-xxxx-xxxx-xxxxxxx#
In other words, copy the code portion of the URL after code= until, and not including &session_state
Paste the code into authorization_code in the drive configuration and then save the configuration.
If all has gone well, you should not see any errors upon saving.